約 4,172,005 件
https://w.atwiki.jp/motionbuilder_plugin/pages/14.html
3Dキャラクタアニメーション制作に特化したソフトウェア MotionBuilder Autodesk MotionBuilder http //www.autodesk.co.jp/adsk/servlet/index?id=7065572&siteID=1169823 CEDEC2007 Autodesk セミナー http //me.autodesk.jp/event/CEDEC2007/index.html
https://w.atwiki.jp/usb_audio/pages/42.html
原文:Audio Device Document 1.0(PDF) USB Device Class Definition for Audio Devices Release 1.0 March 18, 1998 66 5.2.1.1 Set Request This request is used to set an attribute of a Control inside an Entity of the audio function. Additionally, the memory space attribute of an Entity itself can be set through this request. Table 5-1 Set Request Values bmRequest Type bRequest wValue wIndex wLength Data 00100001B Entity ID and Interface 00100010B SET_CUR SET_MIN SET_MAX SET_RES SET_MEM See following paragraphs Endpoint Length of parameter block Parameter block The bmRequestType field specifies that this is a SET request (D7=0b0). It is a class-specific request (D6..5=0b01), directed to either the AudioControl interface or an AudioStreaming interface of the audio function (D4..0=0b00001) or the isochronous endpoint of an AudioStreaming interface (D4..0=0b00010). The bRequest field contains a constant, identifying which attribute of the addressed Control or Entity is to be modified. Possible attributes for a Control are its · Current setting attribute (SET_CUR) · Minimum setting attribute (SET_MIN) · Maximum setting attribute (SET_MAX) · Resolution attribute (SET_RES) Possible attributes for an Entity are its · Memory space attribute (SET_MEM) If the addressed Control or Entity does not support modification of a certain attribute, the control pipe must indicate a stall when an attempt is made to modify that attribute. In most cases, only the CUR and MEM attribute will be supported for the Set request. However, this specification does not prevent a designer from making other attributes programmable. For the list of Request constants, refer to Section A.9, “Audio Class-Specific Request Codes.” The wValue field interpretation is qualified by the value in the wIndex field. Depending on what Entity is addressed, the layout of the wValue field changes. The following paragraphs describe the contents of the wValue field for each Entity separately. In most cases, the wValue field contains the Control Selector (CS) in the high byte. It is used to address a particular Control within Entities that can contain multiple Controls. If the Entity only contains a single Control, there is no need to specify a Control Selector and the wValue field can be used to pass additional parameters. The wIndex field specifies the interface or endpoint to be addressed in the low byte and the Entity ID or zero in the high byte. In case an interface is addressed, the virtual Entity ‘interface’ can be addressed by specifying zero in the high byte. The values in wIndex must be appropriate to the recipient. Only existing Entities in the audio function can be addressed and only appropriate interface or endpoint numbers may be used. If the request specifies an unknown or non-Entity ID or an unknown interface or endpoint number, the control pipe must indicate a stall. The actual parameter(s) for the Set request are passed in the data stage of the control transfer. The length of the parameter block is indicated in the wLength field of the request. The layout of the parameter block is qualified by both the bRequest and wIndex fields. Refer to the following sections for a detailed description of the parameter block layout for all possible Entities. USB Device Class Definition for Audio Devices Release 1.0 March 18, 1998 67 5.2.1.2 Get Request This request returns the attribute setting of a specific Control inside an Entity of the audio function. Additionally, the memory space attribute of an Entity itself can be returned through this request. Table 5-2 Get Request Values bmRequest Type bRequest wValue wIndex wLength Data 10100001B Entity ID and Interface 10100010B GET_CUR GET_MIN GET_MAX GET_RES GET_MEM See following paragraphs Endpoint Length of parameter block Parameter block The bmRequestType field specifies that this is a GET request (D7=0b1). It is a class-specific request (D6..5=0b01), directed to either the AudioControl interface or an AudioStreaming interface of the audio function (D4..0=0b00001) or the isochronous endpoint of an AudioStreaming interface (D4..0=0b00010). The bRequest field contains a constant, identifying which attribute of the addressed Control or Entity is to be returned. Possible attributes for a Control are its · Current setting attribute (GET_CUR) · Minimum setting attribute (GET_MIN) · Maximum setting attribute (GET_MAX) · Resolution attribute (GET_RES) Possible attributes for an Entity are its · Memory space attribute (GET_MEM) If the addressed Control or Entity does not support readout of a certain attribute, the control pipe must indicate a stall when an attempt is made to read that attribute. For the list of Request constants, refer to Section A.9, “Audio Class-Specific Request Codes.” The wValue field interpretation is qualified by the value in the wIndex field. Depending on what Entity is addressed, the layout of the wValue field changes. The following paragraphs describe the contents of the wValue field for each Entity separately. In most cases, the wValue field contains the Control Selector (CS) in the high byte. It is used to address a particular Control within Entities that can contain multiple Controls. If the Entity only contains a single Control, there is no need to specify a Control Selector and the wValue field can be used to pass additional parameters. The wIndex field specifies the interface or endpoint to be addressed in the low byte and the Entity ID or zero in the high byte. In case an interface is addressed, the virtual Entity ‘interface’ can be addressed by specifying zero in the high byte. The values in wIndex must be appropriate to the recipient. Only existing Entities in the audio function can be addressed and only appropriate interface or endpoint numbers may be used. If the request specifies an unknown or non-Entity ID or an unknown interface or endpoint number, the control pipe must indicate a stall. The actual parameter(s) for the Get request are returned in the data stage of the control transfer. The length of the parameter block to return is indicated in the wLength field of the request. If the parameter block is longer than what is indicated in the wLength field, only the initial bytes of the parameter block are returned. If the parameter block is shorter than what is indicated in the wLength field, the device indicates the end of the control transfer by sending a short packet when further data is requested. The layout of the parameter block is qualified by both the bRequest and wIndex fields. Refer to the following sections for a detailed description of the parameter block layout for all possible Entities. USB Device Class Definition for Audio Devices Release 1.0 March 18, 1998 68 5.2.2 AudioControl Requests The following sections describe the possible requests that can be used to manipulate the audio Controls an audio function exposes through its Units. The same layout of the parameter blocks is used for both the Set and Get requests. 5.2.2.1 Terminal Control Requests The following paragraphs describe the Set and Get Terminal Control requests. 5.2.2.1.1 Set Terminal Control Request This request is used to set an attribute of a Terminal Control inside a Terminal of the audio function. Table 5-3 Set Terminal Control Request Values bmRequest Type bRequest wValue wIndex wLength Data 00100001B SET_CUR SET_MIN SET_MAX SET_RES CS Terminal ID and Interface Length of parameter block Parameter block The bRequest field indicates which attribute the request is manipulating. The MIN, MAX and RES attributes are usually not supported for the Set request. The wValue field specifies the Control Selector (CS) in the high byte and zero in the low byte. The Control Selector indicates which type of Control this request is manipulating. If the request specifies an unknown or unsupported CS to that Terminal, the control pipe must indicate a stall. For a description of the parameter block for the Terminal Controls, see Section 5.2.2.1.3, “Terminal Controls.” 5.2.2.1.2 Get Terminal Control Request This request returns the attribute setting of a specific Terminal Control inside a Terminal of the audio function. Table 5-4 Get Terminal Control Request Values bmRequest Type bRequest wValue wIndex wLength Data 10100001B GET_CUR GET_MIN GET_MAX GET_RES CS Terminal ID and Interface Length of parameter block Parameter block The bRequest field indicates which attribute the request is reading The wValue field specifies the Control Selector (CS) in the high byte and zero in the low byte. The Control Selector indicates which type of Control this request is addressing. If the request specifies an unknown or unsupported CS to that Terminal, the control pipe must indicate a stall. For a description of the parameter block for the Terminal Controls, see Section 5.2.2.1.3, “Terminal Controls.” USB Device Class Definition for Audio Devices Release 1.0 March 18, 1998 69 5.2.2.1.3 Terminal Controls For the time being, this specification defines only one Terminal Control. The following section presents a detailed description. 5.2.2.1.3.1 Copy Protect Control The Copy Protect Control is used to manipulate the Copy Protection Level (CPL) associated with a particular Terminal. Not all Terminals are required to support this Control. Only the Terminals that represent a connection to the audio function where audio streams enter or leave the audio function in a form that enables lossless duplication should consider Copy Protect Control. Input Terminals in this category should only support the Get Terminal Copy Protect Control request whereas Output Terminals in the same category should only support the Set Terminal Copy Protect Control request. A Copy Protect Control only supports the CUR attribute. The settings for the CUR attribute range from 0 to 2. This means · 0 CPL0 Copying is permitted without restriction. The material is either not copyrighted, or the copyright is not asserted. · 1 CPL1 One generation of copies may be made. The material is copyright protected and is the original. · 2 CPL2 The material is copyright protected and no digital copying is permitted. The Copy Protect Control honors the request to the best of its abilities. It may round the bCopyProtect attribute value to its closest available setting. It will report this setting when queried during a Get Control request. Table 5-5 Copy Protect Control Parameter Block Control Selector COPY_PROTECT_CONTROL wLength 1 Offset Field Size Value Description 0 bCopyProtect 1 Number The setting for the CUR attribute of the CopyProtect Control. 0x00 CPL0 0x01 CPL1 0x02 CPL2 5.2.2.2 Mixer Unit Control Requests The following paragraphs describe the Set and Get Mixer Unit Control requests. The Set Mixer Unit Control request can have two forms. The first form must be supported while the second form can be optionally implemented. The Get Mixer Unit Control request can have three forms. The first form must be supported, while the second and third form can be optionally implemented. If the second form of the Set request is implemented, the second form of the Get request must also be implemented. USB Device Class Definition for Audio Devices Release 1.0 March 18, 1998 70 5.2.2.2.1 Set Mixer Unit Control Request This request is used to set an attribute of a Mixer Control inside a Mixer Unit of the audio function. Table 5-6 Set Mixer Unit Control Request Values bmRequest Type bRequest wValue wIndex wLength Data 00100001B SET_CUR SET_MIN SET_MAX SET_RES ICN and OCN Mixer Unit ID and Interface Length of parameter block Parameter block The bRequest field indicates which attribute the request is manipulating. The MIN, MAX and RES attributes are usually not supported for the Set request. Because the Mixer Unit only contains a single type of Control, there is no need for a Control Selector. Instead, the wValue field specifies the Input Channel Number (ICN) in the high byte and the Output Channel Number (OCN) in the low byte of the Mixer Control to be influenced. The ICN is derived from both the input cluster number and the logical channel number within that cluster, according to the rules established in Section 4.3.2.3, “Mixer Unit Descriptor.” (ICN=u, OCN=v) If the request specifies an unknown ICN or OCN to that Unit or refers to a non-programmable Mixer Control in the Mixer Unit, the control pipe must indicate a stall. A special case arises when the Input Channel Number and Output Channel Number are both set to 0xFF. Then a single Set Mixer Unit Control request can be used to set an attribute of all the programmable Mixer Controls within the Unit. The number of parameters passed in the parameter block must exactly match the number of programmable Mixer Controls in the Unit. If this is not the case, the control pipe must indicate a stall. The ordering of the parameters in the parameter block obeys the same rules as established for the bit ordering in the bmControls field of the Mixer Unit Descriptor. The parameter block must contain an attribute setting for every Mixer Control that has its bit set in the bmControls field. The previous description is referred to as the second form of the Set Mixer Unit Control request. For a description of the parameter block for the Set Mixer Unit Control request, see Section 5.2.2.2.3, “Mixer Control.” 5.2.2.2.2 Get Mixer Unit Control Request This request returns the attribute setting of a specific Mixer Control inside a Mixer Unit of the audio function. Table 5-7 Get Mixer Unit Control Request Values bmRequest Type bRequest wValue wIndex wLength Data 10100001B GET_CUR GET_MIN GET_MAX GET_RES ICN and OCN Mixer Unit ID and Interface Length of parameter block Parameter block The bRequest field indicates which attribute the request is reading Because the Mixer Unit only contains a single type of Control, there is no need for a Control Selector. Instead, the wValue field specifies the Input Channel Number (ICN) in the high byte and the Output Channel Number (OCN) in the low byte of the Mixer Control to be retrieved. The ICN is derived from both the input cluster number and the logical channel number within that cluster, according to the rules 1 - 6 - 11 - 16 - 21 - 26 - 31 - 36 - 41 - 46 - 51 - 56 - 61 - 66 - 71 - 76 - 81 - 86 - 91 - 96 - 101 - 106 - 111 - 116 - 121 - 126 ここを編集
https://w.atwiki.jp/usb_audio/pages/51.html
原文:Audio Device Document 1.0(PDF) USB Device Class Definition for Audio Devices Release 1.0 March 18, 1998 111 Offset Field Size Value Description 6 bInterfaceSubclass 1 0x02 AUDIO_STREAMING. 7 bInterfaceProtocol 1 0x00 Unused. 8 iInterface 1 0x00 Unused. B.3.4.2.1.2 Class-specific AS General Interface Descriptor Table B-9 USB Microphone Class-specific AS General Interface Descriptor Offset Field Size Value Description 0 bLength 1 0x07 Size of this descriptor, in bytes. 1 bDescriptorType 1 0x24 CS_INTERFACE descriptor. 2 bDescriptorSubtype 1 0x01 GENERAL subtype. 3 bTerminalLink 1 0x02 Unit ID of the Output Terminal. 4 bDelay 1 0x01 Interface delay. 5 wFormatTag 2 0x0001 PCM Format. B.3.4.2.1.3 Type I Format Type Descriptor Table B-10 USB Microphone Type I Format Type Descriptor Offset Field Size Value Description 0 bLength 1 0x0B Size of this descriptor, in bytes. 1 bDescriptorType 1 0x24 CS_INTERFACE descriptor. 2 bDescriptorSubtype 1 0x02 FORMAT_TYPE subtype. 3 bFormatType 1 0x01 FORMAT_TYPE_I. 4 bNrChannels 1 0x01 One channel. 5 bSubFrameSize 1 0x02 Two bytes per audio subframe. 6 bBitResolution 1 0x10 16 bits per sample. 7 bSamFreqType 1 0x01 One frequency supported. 8 tSamFreq 3 0x01F40 8000Hz. B.3.4.2.1.4 Standard Endpoint Descriptor USB Device Class Definition for Audio Devices Release 1.0 March 18, 1998 112 Table B-11 USB Microphone Standard Endpoint Descriptor Offset Field Size Value Description 0 bLength 1 0x09 Size of this descriptor, in bytes. 1 bDescriptorType 1 0x05 ENDPOINT descriptor. 2 bEndpointAddress 1 0x81 IN Endpoint 1. 3 bmAttributes 1 0x01 Isochronous, not shared. 4 wMaxPacketSize 2 0x0010 16 bytes per packet. 6 bInterval 1 0x01 One packet per frame. 7 bRefresh 1 0x00 Unused. 8 bSynchAddress 1 0x00 Unused. B.3.4.2.1.5 Class-specific Isochronous Audio Data Endpoint Descriptor Table B-12 USB Microphone Class-specific Isoc. Audio Data Endpoint Descriptor Offset Field Size Value Description 0 bLength 1 0x07 Size of this descriptor, in bytes. 1 bDescriptorType 1 0x25 CS_ENDPOINT descriptor 2 bDescriptorSubtype 1 0x01 GENERAL subtype. 3 bmAttributes 1 0x00 No sampling frequency control, no pitch control, no packet padding. 4 bLockDelayUnits 1 0x00 Unused. 5 wLockDelay 2 0x0000 Unused. B.3.5 String Descriptors There are two string descriptors available. The first string descriptor contains the Manufacturer information and the second one contains Product related information. The following sections present an example of how these descriptors could look like. B.3.5.1 Manufacturer String Descriptor Table B-13 USB Microphone Manufacturer String Descriptor Offset Field Size Value Description 0 bLength 1 0x18 Size of this descriptor, in bytes. 1 bDescriptorType 1 0x03 STRING descriptor. USB Device Class Definition for Audio Devices Release 1.0 March 18, 1998 113 Offset Field Size Value Description 2 bString 1 0x0054 0x0048 0x0045 0x0020 0x0043 0x004F 0x004D 0x0050 0x0041 0x004E 0x0059 “THE COMPANY” B.3.5.2 Product String Descriptor Table B-14 USB Microphone Product String Descriptor Offset Field Size Value Description 0 bLength 1 0x18 Size of this descriptor, in bytes. 1 bDescriptorType 1 0x03 STRING descriptor. 2 bString 1 0x004D 0x0069 0x0063 0x0072 0x006F 0x0070 0x0068 0x006F 0x006E 0x0065 “Microphone” B.4 Requests B.4.1 Standard Requests The microphone supports all necessary standard requests. B.4.2 Class-specific Requests There are no class-specific requests supported. USB Device Class Definition for Audio Devices Release 1.0 March 18, 1998 114 Appendix C. Example 2 USB Telephone (Informative) C.1 Product Description This is a USB Telephone with 16-bit 8KHz input and output. It has a handset and Phone line in and out connectors. Selector Units are used to allow the Host to talk directly to the telephone line or to allow the handset to be used with the Host for an Internet telephone call. This is an analog device. The telephone line and handset signals are analog and all switching is performed in the analog domain. The digital USB audio stream, coming from AudioStreaming interface 1 is converted to the analog domain before entering the audio function through Input Terminal ID3. Likewise, the analog signal coming from Selector Unit ID9 is delivered to Output Terminal ID6 and converted back to the digital domain before it is delivered to AudioStreaming interface 2. AudioStreaming Interface #2 Audio Function Phone Line IT OT USB IN Endpoint IT IT OT OT Phone Line Handset Handset ID1 ID2 ID3 ID9 ID7 ID8 ID4 ID5 ID6 AudioStreaming Interface #1 USB OUT Endpoint Figure C-1 USB Telephone Topology It is a neat device, but telephones that are much more elaborate could be constructed with speakerphone and acoustic echo cancellation incorporated. C.2 Descriptor Hierarchy This USB Telephone device includes an AudioControl interface (0) and two AudioStreaming interfaces (1 2). The AudioStreaming interfaces both feature two alternate settings. The first alternate setting (Alternate Setting 0) has zero bandwidth associated with it so that switching to this alternate setting effectively frees all allocated bandwidth on the USB for this device. Zero bandwidth is indicated by the lack of a streaming endpoint. Alternate Setting 1 is the operational part of the interface and it has one isochronous endpoint. Figure presents the descriptor hierarchy. USB Device Class Definition for Audio Devices Release 1.0 March 18, 1998 115 Interface 0 Device Configuration AudioControl I/F Header Phone Line IT Handset IT Standard Descriptors Class-Specific Descriptors USB OUT EP IT Phone Line OT Handset OT USB IN EP OT Phone Line SU Handset SU USB OUT SU AS I/F Alt. Setting 0 Interface 1 AS I/F Alt. Setting 1 General Type I Format Endpoint Endpoint ID1 ID2 ID3 ID4 ID5 ID6 ID7 ID8 ID9 AS I/F Alt. Setting 0 Interface 2 AS I/F Alt. Setting 1 General Type I Format Endpoint Endpoint Figure C-2 USB Telephone Descriptor Hierarchy C.3 Descriptors The following sections present all the descriptors that are used to describe the device. C.3.1 Device Descriptor Table C-1 USB Telephone Device Descriptor Offset Field Size Value Description 0 bLength 1 0x12 Size of this descriptor, in bytes. 1 bDescriptorType 1 0x01 DEVICE descriptor. 2 bcdUSB 2 0x0100 1.00 - current revision of USB spec. 4 bDeviceClass 1 0x00 Device defined at Interface level. 1 - 6 - 11 - 16 - 21 - 26 - 31 - 36 - 41 - 46 - 51 - 56 - 61 - 66 - 71 - 76 - 81 - 86 - 91 - 96 - 101 - 106 - 111 - 116 - 121 - 126 ここを編集
https://w.atwiki.jp/usb_audio/pages/49.html
原文:Audio Device Document 1.0(PDF) USB Device Class Definition for Audio Devices Release 1.0 March 18, 1998 101 wProcessType Value CHORUS_PROCESS 0x05 DYN_RANGE_COMP_PROCESS 0x06 A.8 Audio Class-Specific Endpoint Descriptor Subtypes Table A-8 Audio Class-Specific Endpoint Descriptor Subtypes Descriptor Subtype Value DESCRIPTOR_UNDEFINED 0x00 EP_GENERAL 0x01 A.9 Audio Class-Specific Request Codes Table A-9 Audio Class-Specific Request Codes Class-Specific Request Code Value REQUEST_CODE_UNDEFINED 0x00 SET_ CUR 0x01 GET_ CUR 0x81 SET_ MIN 0x02 GET_ MIN 0x82 SET_ MAX 0x03 GET_ MAX 0x83 SET_ RES 0x04 GET_ RES 0x84 SET_MEM 0x05 GET_ MEM 0x85 GET_STAT 0xFF USB Device Class Definition for Audio Devices Release 1.0 March 18, 1998 102 A.10 Control Selector Codes A.10.1 Terminal Control Selectors Table A-10 Terminal Control Selectors Control Selector Value TE_CONTROL_UNDEFINED 0x00 COPY_PROTECT_CONTROL 0x01 A.10.2 Feature Unit Control Selectors Table A-11 Feature Unit Control Selectors Control Selector Value FU_CONTROL_UNDEFINED 0x00 MUTE_CONTROL 0x01 VOLUME_CONTROL 0x02 BASS_CONTROL 0x03 MID_CONTROL 0x04 TREBLE_CONTROL 0x05 GRAPHIC_EQUALIZER_CONTROL 0x06 AUTOMATIC_GAIN_CONTROL 0x07 DELAY_CONTROL 0x08 BASS_BOOST_CONTROL 0x09 LOUDNESS_CONTROL 0x0A A.10.3 Processing Unit Control Selectors A.10.3.1 Up/Down-mix Processing Unit Control Selectors Table A-12 Up/Down-mix Processing Unit Control Selectors Control Selector Value UD_CONTROL_UNDEFINED 0x00 UD_ENABLE_CONTROL 0x01 UD_MODE_SELECT_CONTROL 0x02 USB Device Class Definition for Audio Devices Release 1.0 March 18, 1998 103 A.10.3.2 Dolby PrologicÔ Processing Unit Control Selectors Table A-13 Dolby Prologic Processing Unit Control Selectors Control Selector Value DP_CONTROL_UNDEFINED 0x00 DP_ENABLE_CONTROL 0x01 DP_MODE_SELECT_CONTROL 0x02 A.10.3.3 3D Stereo Extender Processing Unit Control Selectors Table A-14 3D Stereo Extender Processing Unit Control Selectors Control Selector Value 3D_CONTROL_UNDEFINED 0x00 3D_ENABLE_CONTROL 0x01 SPACIOUSNESS_CONTROL 0x03 A.10.3.4 Reverberation Processing Unit Control Selectors Table A-15 Reverberation Processing Unit Control Selectors Control Selector Value RV_CONTROL_UNDEFINED 0x00 RV_ENABLE_CONTROL 0x01 REVERB_LEVEL_CONTROL 0x02 REVERB_TIME_CONTROL 0x03 REVERB_FEEDBACK_CONTROL 0x04 A.10.3.5 Chorus Processing Unit Control Selectors Table A-16 Chorus Processing Unit Control Selectors Control Selector Value CH_CONTROL_UNDEFINED 0x00 CH_ENABLE_CONTROL 0x01 CHORUS_LEVEL_CONTROL 0x02 CHORUS_RATE_CONTROL 0x03 USB Device Class Definition for Audio Devices Release 1.0 March 18, 1998 104 Control Selector Value CHORUS_DEPTH_CONTROL 0x04 A.10.3.6 Dynamic Range Compressor Processing Unit Control Selectors Table A-17 Dynamic Range Compressor Processing Unit Control Selectors Control Selector Value DR_CONTROL_UNDEFINED 0x00 DR_ENABLE_CONTROL 0x01 COMPRESSION_RATE_CONTROL 0x02 MAXAMPL_CONTROL 0x03 THRESHOLD_CONTROL 0x04 ATTACK_TIME 0x05 RELEASE_TIME 0x06 A.10.4 Extension Unit Control Selectors Table A-18 Extension Unit Control Selectors Control Selector Value XU_CONTROL_UNDEFINED 0x00 XU_ENABLE_CONTROL 0x01 A.10.5 Endpoint Control Selectors Table A-19 Endpoint Control Selectors Control Selector Value EP_CONTROL_UNDEFINED 0x00 SAMPLING_FREQ_CONTROL 0x01 PITCH_CONTROL 0x02 USB Device Class Definition for Audio Devices Release 1.0 March 18, 1998 105 Appendix B. Example 1 USB Microphone (Informative) B.1 Product Description The device described here is a USB Microphone. It is a very simple device that has no Audio Controls incorporated. It delivers a mono audio data stream to the Host over its AudioStreaming interface. The used Audio Data Format is 16-bit 8KHz PCM. The synchronization type is Asynchronous Source. It uses its internal clock as a reference. The following figure presents the internal topology of the microphone. AudioStreaming Interface AudioControl Interface Audio Function Desktop Microphone IT OT USB IN Endpoint Figure B-1 USB Microphone Topology The audio function contains one Input Terminal that represents the actual microphone pick-up element, followed by the Analog-to-Digital Converter (ADC). The digital output stream of the ADC enters the audio function through the single Output Pin of the Input Terminal. Because there is no further processing on the audio stream, the Input Terminal is directly connected to the Input Pin of the Output Terminal. The Output Terminal is the representation within the audio function of the USB IN endpoint that eventually delivers the audio data stream to the Host. The internals of the audio function are presented to the Host through the (mandatory) AudioControl interface whereas the USB IN endpoint resides in the AudioStreaming interface. B.2 Descriptor Hierarchy This USB Microphone device includes the AudioControl interface (interface 0) and a single AudioStreaming interface (interface 1). The AudioStreaming interface features two alternate settings. The first alternate setting (Alternate Setting 0) has zero bandwidth associated with it so that switching to this alternate setting effectively frees all allocated bandwidth on the USB for this device. Zero bandwidth is indicated by the lack of a streaming endpoint. Alternate Setting 1 is the operational part of the interface and it has one isochronous IN endpoint. Figure presents the descriptor hierarchy. 1 - 6 - 11 - 16 - 21 - 26 - 31 - 36 - 41 - 46 - 51 - 56 - 61 - 66 - 71 - 76 - 81 - 86 - 91 - 96 - 101 - 106 - 111 - 116 - 121 - 126 ここを編集
https://w.atwiki.jp/usb_audio/pages/53.html
原文:Audio Device Document 1.0(PDF) USB Device Class Definition for Audio Devices Release 1.0 March 18, 1998 121 Offset Field Size Value Description 1 bDescriptorType 1 0x24 CS_INTERFACE. 2 bDescriptorSubtype 1 0x03 OUTPUT_TERMINAL subtype. 3 bTerminalID 1 0x06 ID of this Terminal. 4 wTerminalType 2 0x0101 Terminal is USB Streaming Out. 6 bAssocTerminal 1 0x03 Associated with USB Streaming In Terminal. 7 bSourceID 1 0x09 From USB Selector Unit. 8 iTerminal 1 0x00 Unused. C.3.3.9 Selector Unit Descriptor (ID7) This descriptor describes the Selector Unit connected to the Phone Line Out Output Terminal. Either Handset In or USB In signals can be selected. Table C-11 USB Telephone Selector Unit Descriptor (ID7) Offset Field Size Value Description 0 bLength 1 0x09 Size of this descriptor, in bytes. 1 bDescriptorType 1 0x24 CS_INTERFACE. 2 bDescriptorSubtype 1 0x05 SELECTOR_UNIT subtype. 3 bUnitD 1 0x07 ID of this Unit. 4 bNrInPins 1 0x02 Number of input pins. 6 baSourceID(1) 1 0x02 From Handset In Terminal. 7 baSourceID(2) 1 0x03 From USB Streaming In Terminal. 8 iSelector 1 0x00 Unused. C.3.3.10 Selector Unit Descriptor (ID8) This descriptor describes the Selector Unit connected to the Handset Out Output Terminal. Either Phone Line In or USB In signals can be selected. Table C-12 USB Telephone Selector Unit Descriptor (ID8) Offset Field Size Value Description 0 bLength 1 0x09 Size of this descriptor, in bytes. 1 bDescriptorType 1 0x24 CS_INTERFACE. USB Device Class Definition for Audio Devices Release 1.0 March 18, 1998 122 Offset Field Size Value Description 2 bDescriptorSubtype 1 0x05 SELECTOR_UNIT subtype. 3 bUnitD 1 0x08 ID of this Unit. 4 bNrInPins 1 0x02 Number of input pins. 6 baSourceID(1) 1 0x01 From Phone Line In Terminal. 7 baSourceID(2) 1 0x03 From USB Streaming In Terminal. 8 iSelector 1 0x00 Unused. C.3.3.11 Selector Unit Descriptor (ID9) This descriptor describes the Selector Unit connected to the USB Streaming Out Output Terminal. Either Phone Line In or Handset In signals can be selected. Table C-13 USB Telephone Selector Unit Descriptor (ID9) Offset Field Size Value Description 0 bLength 1 0x09 Size of this descriptor, in bytes. 1 bDescriptorType 1 0x24 CS_INTERFACE. 2 bDescriptorSubtype 1 0x05 SELECTOR_UNIT subtype. 3 bUnitD 1 0x09 ID of this Unit 4 bNrInPins 1 0x02 Number of input pins. 6 baSourceID(1) 1 0x01 From Phone Line In Terminal. 7 baSourceID(2) 1 0x02 From Handset In Terminal. 8 iSelector 1 0x00 Unused. C.3.4 AudioStreaming Interface 1 Descriptor The AudioStreaming interface 1 is used for streaming audio from the Host to the USB Telephone device. AudioStreaming interface 1 has two alternate settings. The first is the zero bandwidth alternate setting (Alternate Setting 0), used to reclaim USB bandwidth. It is also the default alternate setting. The second alternate setting (1) is the fully operational setting for the Host to Device streaming communication. C.3.4.1 Zero-bandwidth Alternate Setting 0 C.3.4.1.1.1 Standard Interface Descriptor USB Device Class Definition for Audio Devices Release 1.0 March 18, 1998 123 Table C-14 USB Telephone Standard Interface Descriptor (Alt. Set. 0) Offset Field Size Value Description 0 bLength 1 0x09 Size of this descriptor, in bytes. 1 bDescriptorType 1 0x04 INTERFACE descriptor. 2 bInterfaceNumber 1 0x01 Index of this interface. 3 bAlternateSetting 1 0x00 Index of this setting. 4 bNumEndpoints 1 0x00 0 endpoints. 5 bInterfaceClass 1 0x01 AUDIO. 6 bInterfaceSubclass 1 0x02 AUDIO_STREAMING. 7 bInterfaceProtocol 1 0x00 Unused. 8 iInterface 1 0x00 Unused. C.3.4.2 Operational Alternate Setting 1 C.3.4.2.1.1 Standard AS Interface Descriptor Table C-15 USB Telephone Standard AS Interface Descriptor Offset Field Size Value Description 0 bLength 1 0x09 Size of this descriptor, in bytes. 1 bDescriptorType 1 0x04 INTERFACE descriptor. 2 bInterfaceNumber 1 0x01 Index of this interface. 3 bAlternateSetting 1 0x01 Index of this setting. 4 bNumEndpoints 1 0x01 1 endpoint. 5 bInterfaceClass 1 0x01 AUDIO. 6 bInterfaceSubclass 1 0x02 AUDIO_STREAMING. 7 bInterfaceProtocol 1 0x00 Unused. 8 iInterface 1 0x00 Unused. C.3.4.2.1.2 Class-specific AS Interface Descriptor Table C-16 USB Telephone Class-specific AS Interface Descriptor Offset Field Size Value Description USB Device Class Definition for Audio Devices Release 1.0 March 18, 1998 124 Offset Field Size Value Description 0 bLength 1 0x07 Size of this descriptor, in bytes. 1 bDescriptorType 1 0x24 CS_INTERFACE descriptor. 2 bDescriptorSubtype 1 0x01 GENERAL. 3 bTerminalLink 1 0x03 Linked to USB Streaming In Terminal. 4 bDelay 1 0x01 Interface delay. 5 wFormatTag 2 0x0001 PCM format. C.3.4.2.1.3 Type I Format Type Descriptor Table C-17 USB Telephone Type I Format Type Descriptor Offset Field Size Value Description 0 bLength 1 0x0B Size of this descriptor, in bytes. 1 bDescriptorType 1 0x24 CS_INTERFACE. 2 bDescriptorSubtype 1 0x02 FORMAT_TYPE. 3 bFormatType 1 0x01 FORMAT_TYPE_I. 4 bNrChannels 1 0x01 One channel. 5 bSubFrameSize 1 0x02 Two bytes per slot. 6 bBitResolution 1 0x10 16 bits. 7 bSamFreqType 1 0x01 One sampling frequency. 8 tSamFreq 3 0x01F40 8000Hz is the sampling frequency. C.3.4.2.1.4 Standard Endpoint Descriptor Table C-18 USB Telephone Standard Endpoint Descriptor Offset Field Size Value Description 0 bLength 1 0x09 Size of this descriptor, in bytes. 1 bDescriptorType 1 0x05 ENDPOINT descriptor. 2 bEndpointAddress 1 0x01 OUT Endpoint 1. 3 bmAttributes 1 0x0B Isochronous transfer type, synchronous synchronization type. 4 wMaxPacketSize 2 0x0010 16 bytes per packet (8 two-byte USB Device Class Definition for Audio Devices Release 1.0 March 18, 1998 125 Offset Field Size Value Description samples). 6 bInterval 1 0x01 One packet every frame. 7 bRefresh 1 0x00 Unused. 8 bSynchAddress 1 0x00 Unused. C.3.4.2.1.5 Class-specific Isochronous Audio Data Endpoint Descriptor Table C-19 USB Telephone Class-specific Isoc. Audio Data Endpoint Descriptor Offset Field Size Value Description 0 bLength 1 0x07 Size of this descriptor, in bytes. 1 bDescriptorType 1 0x25 CS_ENDPOINT. 2 bDescriptorSubtype 1 0x01 GENERAL. 3 bmAttributes 1 0x00 No sampling frequency control, no pitch control. 4 bLockDelayUnits 1 0x00 Unused. 5 wLockDelay 2 0x0000 Unused. C.3.5 AudioStreaming Interface 2 Descriptor The AudioStreaming interface 2 is used for streaming audio from the USB Telephone device to the Host. AudioStreaming interface 2 has two alternate settings. The first is the zero bandwidth alternate setting (Alternate Setting 0), used to reclaim USB bandwidth. It is also the default alternate setting. The second alternate setting (1) is the fully operational setting for the Device to Host streaming communication. C.3.5.1 Zero-bandwidth Alternate Setting 0 C.3.5.1.1.1 Standard Interface Descriptor Table C-20 USB Telephone Standard Interface Descriptor (Alt. Set. 0) Offset Field Size Value Description 0 bLength 1 0x09 Size of this descriptor, in bytes. 1 bDescriptorType 1 0x04 INTERFACE descriptor. 2 bInterfaceNumber 1 0x01 Index of this interface. 3 bAlternateSetting 1 0x00 Index of this setting. 4 bNumEndpoints 1 0x00 0 endpoints. 1 - 6 - 11 - 16 - 21 - 26 - 31 - 36 - 41 - 46 - 51 - 56 - 61 - 66 - 71 - 76 - 81 - 86 - 91 - 96 - 101 - 106 - 111 - 116 - 121 - 126 ここを編集
https://w.atwiki.jp/usb_audio/pages/23.html
原文:Audio Data Formats 1.0(PDF) USB Device Class Definition for Audio Data Formats Release 1.0 March 18, 1998 16 Bit D6 indicates that the multilingual information that is encoded at normal sampling rates (32 kHz, 44.1 kHz or 48 kHz). This bit is only applicable for MPEG-2 decoders. Bit D7 indicates that the decoder is capable of processing streams that are encoded using adaptive multichannel prediction. Bits D9..8 indicate if the decoder can process embedded multilingual information. Multilingual capabilities can consist of being able to process multilingual information encoded at the same sampling frequency as the main audio channels (D9..8 = ‘01’). Some decoders may provide the additional capability to process multilingual information encoded at half the sampling frequency of the main audio channels (D9..8 = ‘11’). Bits D15..10 are reserved for future extensions. The bmMPEGFeatures field indicates compression-related features. Bits D5..4 report which type of Dynamic Range Control the MPEG decoder supports. Some decoders do not implement DRC (D5..4 = ‘00’). If implemented, the DRC can either use the stream embedded gain parameters as is (D5..4 = ‘01’) or can provide for additional DRC scaling factors, either a single scaling factor that influences both the boost and cut value simultaneously (D5..4 = ‘10’) or a separate scaling factor for the boost and the cut value (D5..4 = ‘11’) All other bits are reserved. Table 2-7 MPEG Format-Specific Descriptor Offset Field Size Value Description 0 bLength 1 Number Size of this descriptor, in bytes 9 1 bDescriptorType 1 Constant CS_INTERFACE descriptor type. 2 bDescriptorSubtype 1 Constant FORMAT_SPECIFIC descriptor subtype. 3 wFormatTag 2 Constant MPEG. Constant identifying the precise format the AudioStreaming interface is using. USB Device Class Definition for Audio Data Formats Release 1.0 March 18, 1998 17 Offset Field Size Value Description 5 bmMPEGCapabilities 2 Bitmap Bitmap identifying the MPEG capabilities of the decoder. A bit set indicates that the capability is supported D2..0 Layer support D0 = Layer ID1 = Layer IID2 = Layer IIID3 MPEG-1 only.D4 MPEG-1 dual-channel.D5 MPEG-2 second stereo.D6 MPEG-2 7.1 channel augmentation.D7 Adaptive multi-channel prediction.D9..8 MPEG-2 multilingual support 00 = Not supported01 = Supported at Fs10 = Reserved11 = Supported at Fs and ½Fs.D15..10 Reserved. 7 bmMPEGFeatures 1 Bitmap Bitmap identifying the features the decoder supports. A bit set indicates that the feature is supported D3..0 Reserved.D5..4 Internal Dynamic Range Control 00 = not supported.01 = supported but not scalable.10 = scalable, common boost and cut scaling value.11 = scalable, separate boost and cut scaling value.D7..6 Reserved. 2.3.8.1.2 MPEG Format-Specific Requests The following paragraphs describe the Set and Get MPEG Control requests. Some of the requests control parameters that are also dependent on the content of the incoming MPEG data stream. In general, the behavior of the MPEG decoder is primarily controlled by the incoming bitstream. Parameters set using MPEG Control requests retain their setting, even if that setting is not applicable to the current incoming bitstream. As an example, consider a decoder that is receiving a stream containing two independent stereo channel pairs. In this case, the Select Second Stereo Control can be enabled so that the second stereo channel is reproduced over the Left and Right channel. If the incoming stream is now switched to a full 5.1 encoded stream, the Select Second Stereo Control has no more influence and the decoder overrides its setting and produces full 5.1 sound. However, if the incoming stream switches back to the previous format, the Select Second Stereo Control becomes active again and resumes its previous setting so that the second stereo channel is reproduced again over the Left and Right channel. USB Device Class Definition for Audio Data Formats Release 1.0 March 18, 1998 18 2.3.8.1.2.1 Set MPEG Control Request This request is used to set an attribute of an MPEG Control inside an AudioStreaming interface of the audio function. Table 2-8 Set MPEG Control Request Values bmRequest Type bRequest wValue wIndex wLength Data 00100001B SET_CURSET_MINSET_MAXSET_RES CS Zero and Interface Length of parameter block Parameter plock The bRequest field indicates which attribute the request is manipulating. The MIN, MAX and RES attributes are usually not supported for the Set request. Further details on which attributes are supported for which Controls can be found in Section 2.3.8.1.2.3, “MPEG Controls.” The wValue field specifies the Control Selector (CS) in the high byte and zero in the low byte. The Control Selector indicates which type of control this request is manipulating. If the request specifies an unknown or unsupported CS to that interface, the control pipe must indicate a stall. For a description of the parameter blocks for the different Controls that can be addressed through the Set AC-3 Control request, see Section 2.3.8.1.2.3, “MPEG Controls.” 2.3.8.1.2.2 Get MPEG Control Request This request returns the attribute setting of a specific MPEG Control inside an AudioStreaming interface of the audio function. Table 2-9 Get MPEG Control Request Values bmRequest Type bRequest wValue wIndex wLength Data 10100001B GET_CURGET_MINGET_MAXGET_RES CS Zero and Interface Length of parameter block Parameter block The bRequest field indicates which attribute the request is reading. The wValue field specifies the Control Selector (CS) in the high byte and zero in the low byte. The Control Selector indicates which type of control this request is addressing. If the request specifies an unknown or unsupported CS to that interface, the control pipe must indicate a stall. For a description of the parameter blocks for the different Controls that can be addressed through the Get AC-3 Control request, see Section 2.3.8.1.2.3, “MPEG Controls.” 2.3.8.1.2.3 MPEG Controls The following paragraphs present a detailed description of all possible AC-3 Controls an AudioStreaming interface can incorporate. For each Control, the layout of the parameter block together with the appropriate Control Selector is listed. The Control Selector codes are defined in Section A.3.1, “MPEG Control Selectors.” USB Device Class Definition for Audio Data Formats Release 1.0 March 18, 1998 19 2.3.8.1.2.3.1 Dual Channel Control The Dual Channel Control is used to select which of the two available channels in the MPEG-1 base stream is actually retrieved and reproduced over the Left and Right output channels. If this Control is addressed on a decoder that does not implement Dual Channel Control (D4 = ‘0’ in the bmMPEGCapabilities field of the MPEG format-specific descriptor), the control pipe must indicate a stall. The Dual Channel Control can have only the current setting attribute (CUR). The position of the Channel2Enable switch can be either TRUE or FALSE. When FALSE, Channel I is selected, and when TRUE, Channel II is selected. The current setting of the Control can be queried using a Get MPEG Control request. Table 2-10 Dual Channel Control Parameter Block Control Selector MP_DUAL_CHANNEL_CONTROL wLength 1 Offset Field Size Value Description 0 BChannel2Enable 1 Number The setting for the attribute of the Dual Channel Control. Channel I selected when FALSE, Channel II selected when TRUE. 2.3.8.1.2.3.2 Second Stereo Control The Second Stereo Control is used to select the second stereo channel pair that can be encoded in an MPEG-2 stream instead of the multi-channel stereophonic information (3/2). If this Control is addressed on a decoder that does not implement Second Stereo support (D5 = ‘0’ in the bmMPEGCapabilities field of the MPEG format-specific descriptor), the control pipe must indicate a stall. The Second Stereo Control can have only the current setting attribute (CUR). The position of the 2ndStereoEnable switch can be either TRUE or FALSE. When FALSE, the main stereo channel pair is selected; when TRUE, the second stereo channel pair is selected. The current setting of the Control can be queried using a Get MPEG Control request. Table 2-11 Second Stereo Control Parameter Block Control Selector MP_SECOND_STEREO_CONTROL wLength 1 Offset Field Size Value Description 0 B2ndStereoEnable 1 Number The setting for the attribute of the Second Stereo Control. Main stereo channel pair selected when FALSE, second stereo channel pair selected when TRUE. 2.3.8.1.2.3.3 Multilingual Control The Multilingual Control is used to select the multilingual channel actually retrieved from the MPEG stream. If this Control is addressed on a decoder that does not implement multilingual support (D9..8 = USB Device Class Definition for Audio Data Formats Release 1.0 March 18, 1998 20 ‘00’ in the bmMPEGCapabilities field of the MPEG format-specific descriptor), the control pipe must indicate a stall. The Multilingual Control supports only the CUR Control attribute. The valid range is from zero (0x00) to seven (0x07). The actual range depends on the incoming MPEG stream. It may contain only a limited number of multilingual channels (less than seven). The Multilingual Control honors the request to the best of its abilities. It may truncate the attribute values to its closest available settings. It will report these settings when queried during a Get MPEG Control request. Table 2-12 Multilingual Control Parameter Block Control Selector MP_MULTILINGUAL_CONTROL wLength 1 Offset Field Size Value Description 0 bMultiLingual 1 Number The setting for the attribute of the multilingual channel selection 0 = decode no channel1..7 = decode channel 1..78..255 = reserved 2.3.8.1.2.3.4 Dynamic Range Control The Dynamic Range Control (DRC) is used to enable or disable the Dynamic Range Control functionality of the decoder. If the decoder does not support Dynamic Range control (D5..4 = ‘00’ in the bmMPEGFeaturesfield of the MPEG format-specific descriptor), the control pipe must indicate a stall when receiving this request. The Dynamic Range Control can have only the current setting attribute (CUR). The position of the DRC switch can be either TRUE or FALSE. TRUE means that the MPEG decoder is using the Dynamic Range control words (possibly with additional scaling) contained in the MPEG bit stream to control the audio dynamic range. FALSE means the control words are being ignored, and the original signal dynamic range is being reproduced. The current setting of the Control can be queried using a Get MPEG Control request. Table 2-13 Dynamic Range Control Parameter Block Control Selector MP_DYN_RANGE_CONTROL wLength 1 Offset Field Size Value Description 0 bEnable 1 Bool The setting for the Dynamic Range Control CUR attribute. Enabled when TRUE, disabled when FALSE. 2.3.8.1.2.3.5 Scaling Control The Scaling Control is used to manipulate the single scaling coefficient used by MPEG decoders that implement a common boost/cut scaling value for Dynamic Range Control (D5..4 = ‘10’ in the bmMPEGFeatures field of the MPEG format-specific descriptor). If this Control is addressed on a non- ‘10’ decoder, the control pipe must indicate a stall. 1 - 6 - 11 - 16 - 21 - 26 - 31 ここを編集
https://w.atwiki.jp/yukihira/pages/18.html
機能 Plugin名 バージョン 更新日時 リンク PCなしでPlugin管理 pprefs v1.131 7/21 DL 省電力Plugin PowerSaver v0.1.1 8/1 DL 省電力Plugin Gemini v1.3 8/1 DL 輝度を100段階まで変更可能 bright v0.3 8/1 DL LEDをOFFにする LEDOff v1.1 7/17 DL UMDの読み込み音をなくす noUMD v1 fix 7/21 DL Holdをカスタマイズ Hold+ v0.4 8/1 DL 詳細情報表示 HUD v2.75 8/18 DL スクリーンショット(png) sssss v0.2 Mod 8/25 DL バックグラウンドでMP3再生 MusicPrx for6.60 8/15 DL mp3playerplugin v3.3 fix 9/15 DL 任意のキーから電源管理 Power Controller v5.3.0 10/8 DL HOMEボタンをカスタマイズ CustomHOMEβ v0.8.3 10/2 DL ↑の起動に必要 prxcmlib pack 8/22 DL 任意のキーでAPPを直接起動 AutoStart v5.5 8/1 DL どこでもセーブ可能にする PspStateMenuPict v1.04 8/17 DL ファイルの階層を増やす categories-lite v1.5 Beta6 9/15 DL CTFを適応させる CXMB for371~6.60 v2 8/15 DL ダウンロード先を変更 SimplySaverKai for6.XX 8/15 DL テキストでの文字のコピー extended osk v2.0 9/12 DL GAMEでvshメニュー satelite game v4 9/12 DL XMBに戻らないでもAPP起動 QuickBoot v2.0 10/14 DL ダウンロードマネージャー Download Manager v1.0 10/17 DL インターネットラジオ 機能 name バージョン 更新日時 リンク ファイル共有サイトからDL可能 Download Enabler v1.00 8/2 DL
https://w.atwiki.jp/is01rebuild/pages/79.html
現在、まったく分かっていません…orz アドバイス等あれば、 Twitter か下記コメント欄に記入して頂けると幸いです。 現在の状況 完了 msm_audio_dev_ctrl への入出力 ae2drv をkernelモジュール化した ae2drv の完全可視化は完了(※エラー処理除く) ae2drv関連については別ページにした。→ae2関連 /dev/msm_* は kernel/arch/arm/mach-msm/qdsp6 以下にある /dev/ae2 をオープンすると、ma_Open が呼ばれる Audio初期化ルーチン周辺でkernel の ma_Open が呼ばれる→ae2関連 確認中 ae2drv.c 内で GPIO 関連の呼び出しがある→GPIO関連 どうも再生時に /dev/i2c-0 へ書き込みをしている→I2C関連 無保証です。DEBUG中に2回ほど、リブートしました。(/dev/ae2 を2重openするとダメのようだ) 電源管理(音源チップ、スピーカアンプ)→kernel関連??? msm8k_cad はkernel内で呼び出されているようだ。 現状の未着手な課題 I2Cの内容は不明 I2Sの内容も未解明 (仕様すら調べていない…) smd_shdiag_open とは何か? ボリューム調整 kernel の pmem の調査 /dev/pmem_adsp は全く着手していない 予想される流れ、進捗と現在 /dev/msm_audio_dev_ctrl 初期化 実装完了 ↓ /dev/ae2 初期化 ソースコード部分ほぼ実装完了。 変数、未完了。 → ae2drv 内にてGPIOもONされる ↓ どこかで、パワーマネージメント関連が関係?? /dev/power以下を試験中 ↓ I2Cアクセス 実装完了 変数、未完了 ↓ (I2S)→(msm8k_cad)→(msm8k_eqlzr) ↓ /dev/msm_pcm へ Audio データ転送 実装完了 ( )は直接コールせず、kernel内で連鎖的に呼び出されるかも(?)な項目 ae2…dump&trace完了 ただし、バイナリの意味は不明 GPIO…dump&trace半完了 ただし、バイナリの意味は不明 msm_audio_dev_ctrl…dump&trace完了 内容もほぼ判明 msm_pcm…デフォルトのDEBUGをonにした。詳細未解明だが、PCMデータを流し込めばいけそう。 本内容について 2ch root4スレにて、27氏の発言169-172における sound コマンド fi01氏の214における /dev/i2c-0 周り情報 kernel 内にて必要箇所の DEBUG を有効にした結果 をまとめたもの。 はじめに 私はコレをチェックせずにちょっと遠回りした。 ls -l /dev/ | grep audio crw-rw-rw- system audio 239, 0 2011-02-10 23 50 ae2 crw-rw---- system audio 10, 1 2011-02-10 23 50 pmem_adsp crw-rw---- system audio 10, 44 2011-02-10 23 50 msm_qcelp_in crw-rw---- system audio 10, 45 2011-02-10 23 50 msm_evrc_in crw-rw-rw- system audio 10, 46 2011-02-10 23 50 msm_audio_dev_ctrl crw-rw-rw- system audio 10, 49 2011-02-10 23 50 msm_voice crw-rw---- system audio 10, 51 2011-02-10 23 50 msm_mp3 crw-rw---- system audio 10, 52 2011-02-10 23 50 msm_aac_in crw-rw---- system audio 10, 53 2011-02-10 23 50 msm_aac crw-rw-rw- system audio 10, 54 2011-02-10 23 50 msm_pcm_in crw-rw-rw- system audio 10, 55 2011-02-10 23 50 msm_pcm アドレスで分かっている事 kernel/drivers/yamaha/ae2drv.c gpsDriver- pMemory = ioremap( 0x90000000, 64 ); 物理アドレス0x90000000を先頭として64バイト幅をカーネル空間へマッピング? IRQ周り 抽出しただけで、まだ定義を追いかけていない。 kernel/drivers/yamaha/ae2drv.c gpsDriver- dIrq = MSM_GPIO_TO_INT(28); sdResult = request_irq( gpsDriver- dIrq, ma_IrqHandler, IRQF_TRIGGER_FALLING, MA_DEVICE_NAME, gpsDriver ); GPIO周り 番号 方向 プル状態 Drive Strength (?) 有効/無効 027 出力 無し GPIO_2MA 有効 028 入力 プルダウン GPIO_2MA 有効 102 出力 無し GPIO_2MA 有効 121 出力 無し GPIO_2MA 有効 ソース部分 kernel/drivers/yamaha/ae2drv.c gpio_tlmm_config(GPIO_CFG(27, 0, GPIO_OUTPUT, GPIO_NO_PULL, GPIO_2MA), GPIO_ENABLE); gpio_tlmm_config(GPIO_CFG(28, 0, GPIO_INPUT, GPIO_PULL_DOWN, GPIO_2MA), GPIO_ENABLE); gpio_tlmm_config(GPIO_CFG(102, 1, GPIO_OUTPUT, GPIO_NO_PULL, GPIO_2MA), GPIO_ENABLE); gpio_tlmm_config(GPIO_CFG(121, 0, GPIO_OUTPUT, GPIO_NO_PULL, GPIO_2MA), GPIO_ENABLE); arch/arm/mach-msm/board-deckard.c static unsigned audio_gpio_on[] = { GPIO_CFG(68, 1, GPIO_OUTPUT, GPIO_NO_PULL, GPIO_2MA),/* PCM_DOUT */ GPIO_CFG(69, 1, GPIO_INPUT, GPIO_NO_PULL, GPIO_2MA),/* PCM_DIN */ GPIO_CFG(70, 2, GPIO_OUTPUT, GPIO_NO_PULL, GPIO_2MA),/* PCM_SYNC */ GPIO_CFG(71, 2, GPIO_OUTPUT, GPIO_NO_PULL, GPIO_2MA),/* PCM_CLK */ GPIO_CFG(142, 2, GPIO_OUTPUT, GPIO_NO_PULL, GPIO_2MA),/* CC_I2S_CLK */ GPIO_CFG(143, 1, GPIO_OUTPUT, GPIO_NO_PULL, GPIO_2MA),/* SADC_WSOUT */ GPIO_CFG(144, 1, GPIO_INPUT, GPIO_PULL_DOWN, GPIO_2MA),/* SADC_DIN */ GPIO_CFG(145, 1, GPIO_OUTPUT, GPIO_NO_PULL, GPIO_2MA),/* SDAC_DOUT */ GPIO_CFG(146, 2, GPIO_OUTPUT, GPIO_NO_PULL, GPIO_2MA),/* MA_CLK_OUT */ }; /dev/msm_* 関連の include ファイル kernel/include/linux/msm_audio.h kernel/arch/arm/mach-msm/include/mach/qdsp6/msm8k_cad_ioctl.h kernel/arch/arm/mach-msm/include/mach/qdsp6/msm8k_cad_devices.h kernel/arch/arm/mach-msm/include/mach/qdsp6/msm8k_cad_volume.h kernel/arch/arm/mach-msm/include/mach/qdsp6/msm8k_adsp_audio_device.h /dev/msm_* 関連の DEBUG を有効にする。 kernelにおいて Audio 周りをつかさどっているであろう部分で DEBUG 情報を出力するように改変する。 kernel/arch/arm/mach-msm/qdsp6 以下にある、*.c ファイルの下記部分を #if 0 #define D(fmt, args...) printk(KERN_INFO "msm8k_pcm " fmt, ##args) #else #define D(fmt, args...) do {} while (0) #endif を片っ端から次のように編集する。 #if 1 #define D(fmt, args...) printk(KERN_INFO "msm8k_pcm " fmt, ##args) #else #define D(fmt, args...) do {} while (0) #endif これで、かなりの DEBUG メッセージが dmesg すると出てくるようになる。 さらに、ioctl されているが、内容が分からないので出力するように変更した。 下記は、msm8k_pcm.c の例である。 $ diff -u msm8k_pcm.c.orig msm8k_pcm.c --- msm8k_pcm.c.orig2011-02-09 00 39 31.563458406 +0900 +++ msm8k_pcm.c2011-02-07 23 36 23.694297428 +0900 @@ -89,7 +89,7 @@ #include mach/qdsp6/msm8k_cad_volume.h #include mach/qdsp6/msm8k_cad_q6eq_drvi.h -#if 0 +#if 1 #define D(fmt, args...) printk(KERN_INFO "msm8k_pcm " fmt, ##args) #else #define D(fmt, args...) do {} while (0) @@ -237,7 +237,7 @@ u32 percentage; struct cad_event_struct_type eos_event; -D("%s\n", __func__); +D("%s cmd=%x , arg=%lx\n", __func__ , cmd , arg ); memset( cad_dev, 0, sizeof(struct cad_device_struct_type)); memset( cad_stream_dev, 0, あとは、make、boot.img化、ubi化して実機に転送すればok。 私の環境では、make は下記のようになる、CROSS_COMPILE=以降は適宜、自分の環境に合わせて欲しい。 make ARCH=arm CROSS_COMPILE=../../froyo_orig/prebuilt/linux-x86/toolchain/arm-eabi-4.2.1/bin/arm-eabi- kernel は arch/arm/boot/Image がその本体である。 cp -a arch/arm/boot/Image ../../mtd/froyo_boot/ /dev/msm_* 関連の DEBUG 情報の見方 DEBUGを有効にして起動したkernelにて、 # dmesg した結果を抜粋して、数値データの意味を説明する。 6 [ 134.871839] msm8k_cad Registered the async callback function!!! 6 [ 134.871859] msm8k_pcm msm8k_pcm_ioctl cmd=80046103 , arg=7e896b08 6 [ 134.871886] msm8k_pcm msm8k_pcm_ioctl cmd=40046104 , arg=7e896b08 6 [ 134.872099] msm8k_pcm msm8k_pcm_ioctl cmd=40046100 , arg=0 まず、cmd = 80046103 等の cmd の値だが、 $ANDROID_SRC/system/extras/sound/playwav.c を例に挙げて説明すると、 #include linux/ioctl.h (省略) #define AUDIO_IOCTL_MAGIC a #define AUDIO_START _IOW(AUDIO_IOCTL_MAGIC, 0, unsigned) #define AUDIO_STOP _IOW(AUDIO_IOCTL_MAGIC, 1, unsigned) #define AUDIO_FLUSH _IOW(AUDIO_IOCTL_MAGIC, 2, unsigned) #define AUDIO_GET_CONFIG _IOR(AUDIO_IOCTL_MAGIC, 3, unsigned) #define AUDIO_SET_CONFIG _IOW(AUDIO_IOCTL_MAGIC, 4, unsigned) #define AUDIO_GET_STATS _IOR(AUDIO_IOCTL_MAGIC, 5, unsigned) (省略) /* config change should be a read-modify-write operation */ if (ioctl(afd, AUDIO_GET_CONFIG, cfg)) { で、AUDIO_GET_CONFIG は _IOR(AUDIO_IOCTL_MAGIC, 3, unsigned) と変換される。 _IOR や _IOW は kernelのヘッダファイルの linux/ioctl.h で定義されている。 ざっと見た感じでは、unsigned int に変換されていて、下記のようなフォーマットに至る。(と思う…あとで、確認します^^;) cmd = 80046103 だと、 32bit 2bit 14bit 8bit 8bit read write 引数のsize(バイト数) type nr 1 0 (unsigned int)=32bi=4byte=0x004 AUDIO_IOCTL_MAGIC= a =0x61 AUDIO_GET_CONFIG=3 と言う事になる(ようだ^^;)。 間違ってたらごめんなさい。 (書いてるときに面倒になってきて、ヘッダファイルのビット数の所確認していない。32bitが4になってるので4バイトか4オクテットの意味と思う) arg は変数へのポインタなので実行時によって変わるはず。 また、AUDIO_START等のioctlでの全cmd定義は kernel/linux/msm_audio.h にある。 間違いが多く含まれているかもしれません、何かお気づきの点が有りましたら、Twitterか下記まで。 コメント IS01 root スレ4 で、goroh_kun さんがオーディオ関連の情報を書き込んでいました。 以下に引用します。 カーネルのソースコード見ると、 arch/arm/mach-msm/pmic_debugfs.c っていうのがあって、 #mount -t debugfs debugfs /sys/kernel/debug #/sys/kernel/debug/pmic #ls debug index # cat /proc/kmsg # echo 9 index #RTC_GET_TIME_PROC # cat debug とかやると、いろいろなデバッグ用関数を呼び出せます。 debugはechoでパラメータ入れてあげるか、catで内容を見れます。 indexに書き込む数字とdebugへの操作はソースコード参照してください。 arch/arm/mach-msm/pmic.cを見るとだいたいindexに書き込む数字と 機能の割り当て対応は分かると思います。 音源関連のデバッグ関数も多数存在します。 -- (Yukto8492) 2011-03-30 10 57 31 名前 コメント すべてのコメントを見る
https://w.atwiki.jp/usb_audio/pages/37.html
原文:Audio Device Document 1.0(PDF) USB Device Class Definition for Audio Devices Release 1.0 March 18, 1998 41 The bNrInPins field contains the number of Input Pins (p) of the Mixer Unit. This evidently equals the number of audio channel clusters that enter the Mixer Unit. The connectivity of the Input Pins is described via the baSourceID() array, containing p elements. The index i into the array is one-based and directly related to the Input Pin numbers. BaSourceID(i) contains the ID of the Unit or Terminal to which Input Pin i is connected. The cluster descriptors, describing the logical channels entering the Mixer Unit are not repeated here. It is up to the Host software to trace the connections ‘upstream’ to locate the cluster descriptors pertaining to the audio channel clusters. As mentioned before, every input channel can virtually be mixed into all of the output channels. If n is thetotal number of logical input channels, contained in all the audio channel clusters that are entering the Mixer Unit ここに式 and m is the number of logical output channels, then there are n x m mixing Controls in the Mixer Unit, some of which may not be programmable. cite(Note) Both n and m must be limited to 254. Because a Mixer Unit can redefine the spatial locations of the logical output channels, contained in its output cluster, there is a need for a Mixer output cluster descriptor. The bNrChannels, wChannelConfig and iChannelNames characterize the cluster that leaves the Mixer Unit over the single Output Pin (‘downstream’ connection). For a detailed description of the cluster descriptor, see Section 3.7.2.3, “Audio Channel Cluster Format.” The Mixer Unit Descriptor reports which Controls are programmable in the bmControls bitmap field. This bitmap must be interpreted as a two-dimensional bit array that has a row for each logical input channel and a column for each logical output channel. If a bit at position [u, v] is set, this means that the Mixer Unit contains a programmable mixing Control that connects input channel u to output channel v. If bit [u, v] is clear, this indicates that the connection between input channel u and output channel v is non-programmable. Its fixed value can be retrieved through the appropriate request. The valid range for u is from one to n. The valid range for v is from one to m. The bmControls field stores the bit array row after row where the MSb of the first byte corresponds to the connection between input channel 1 and output channel 1. If (n x m) is not an integer multiple of 8, the bit array is padded with zeros until an integer number of bytes is occupied. The number of bytes used to store the bit array, N, can be calculated as follows IF ((n x m) MOD 8) 0 THEN N = ((n x m) DIV 8) + 1 ELSE N = ((n x m) DIV 8) An index to a string descriptor is provided to further describe the Mixer Unit. The following table details the structure of the Mixer Unit descriptor. Table 4-5 Mixer Unit Descriptor Offset Field Size Value Description 0 bLength 1 Number Size of this descriptor, in bytes 10+p+N 1 bDescriptorType 1 Constant CS_INTERFACE descriptor type. 2 bDescriptorSubtype 1 Constant MIXER_UNIT descriptor subtype. USB Device Class Definition for Audio Devices Release 1.0 March 18, 1998 42 Offset Field Size Value Description 3 bUnitID 1 Number Constant uniquely identifying the Unit within the audio function. This value is used in all requests to address this Unit. 4 bNrInPins 1 Number Number of Input Pins of this Unit p 5 baSourceID(1) 1 Number ID of the Unit or Terminal to which the first Input Pin of this Mixer Unit is connected. … … … … … 5+(p-1) baSourceID (p) 1 Number ID of the Unit or Terminal to which the last Input Pin of this Mixer Unit is connected. 5+p bNrChannels 1 Number Number of logical output channels in the Mixer’s output audio channel cluster. 6+p wChannelConfig 2 Bitmap Describes the spatial location of the logical channels. 8+p iChannelNames 1 Index Index of a string descriptor, describing the name of the first logical channel. 9+p bmControls N Number Bit map indicating which mixing Controls are programmable. 9+p+N iMixer 1 Index Index of a string descriptor, describing the Mixer Unit. 4.3.2.4 Selector Unit Descriptor The Selector Unit is uniquely identified by the value in the bUnitID field of the Selector Unit descriptor (SUD). No other Unit or Terminal within the same alternate setting of the AudioControl interface may have the same ID. This value must be passed in the UnitID field of each request that is directed to the Selector Unit. The bNrInPins field contains the number of Input Pins (p) of the Selector Unit. The connectivity of the Input Pins is described via the baSourceID() array that contains p elements. The index i into the array is one-based and directly related to the Input Pin numbers. BaSourceID(i) contains the ID of the Unit or Terminal to which Input Pin i is connected. The cluster descriptors, describing the logical channels that enter the Selector Unit are not repeated here. In order for a Selector Unit to be legally connected, all of the audio channel clusters that enter the Selector Unit must have the same number of channels. However, the spatial locations of these channels may vary from cluster to cluster. Therefore, the Host software should trace all Input Pins to find their ‘upstream’ connection to locate the cluster descriptors for all the Input Pins that enter the Selector Unit. This further implies that the cluster descriptor, associated with the Output Pin of the Selector Unit can change dynamically, depending on the currently selected position of the Selector Unit. An index to a string descriptor is provided to further describe the Selector Unit. The following table details the structure of the Selector Unit descriptor. USB Device Class Definition for Audio Devices Release 1.0 March 18, 1998 43 Table 4-6 Selector Unit Descriptor Offset Field Size Value Description 0 bLength 1 Number Size of this descriptor, in bytes 6+p 1 bDescriptorType 1 Constant CS_INTERFACE descriptor type. 2 bDescriptorSubtype 1 Constant SELECTOR_UNIT descriptor subtype. 3 bUnitID 1 Number Constant uniquely identifying the Unit within the audio function. This value is used in all requests to address this Unit. 4 bNrInPins 1 Number Number of Input Pins of this Unit p 5 baSourceID(1) 1 Number ID of the Unit or Terminal to which the first Input Pin of this Selector Unit is connected. … … … … … 5+(p-1) baSourceID (p) 1 Number ID of the Unit or Terminal to which the last Input Pin of this Selector Unit is connected. 5+p iSelector 1 Index Index of a string descriptor, describing the Selector Unit. 4.3.2.5 Feature Unit Descriptor The Feature Unit is uniquely identified by the value in the bUnitID field of the Feature Unit descriptor (FUD). No other Unit or Terminal within the same alternate setting of the AudioControl interface may have the same ID. This value must be passed in the UnitID field of each request that is directed to the Feature Unit. The bSourceID field is used to describe the connectivity for this Feature Unit. It contains the ID of the Unit or Terminal to which this Feature Unit is connected via its Input Pin. The cluster descriptor, describing the logical channels entering the Feature Unit is not repeated here. It is up to the Host software to trace the connection ‘upstream’ to locate the cluster descriptor pertaining to this audio channel cluster. The bmaControls() array is an array of bit-maps, each indicating the availability of certain audio Controls for a specific logical channel or for the master channel 0. For future expandability, the number of bytes occupied by each element (n) of the bmaControls() array is indicated in the bControlSize field. The number of logical channels in the cluster is denoted by ch. An index to a string descriptor is provided to further describe the Feature Unit. The layout of the Feature Unit descriptor is detailed in the following table. Table 4-7 Feature Unit Descriptor Offset Field Size Value Description 0 bLength 1 Number Size of this descriptor, in bytes 7+(ch+1)*n USB Device Class Definition for Audio Devices Release 1.0 March 18, 1998 44 Offset Field Size Value Description 1 bDescriptorType 1 Constant CS_INTERFACE descriptor type. 2 bDescriptorSubtype 1 Constant FEATURE_UNIT descriptor subtype. 3 bUnitID 1 Number Constant uniquely identifying the Unit within the audio function. This value is used in all requests to address this Unit. 4 bSourceID 1 Constant ID of the Unit or Terminal to which this Feature Unit is connected. 5 bControlSize 1 Number Size in bytes of an element of the bmaControls() array n 6 bmaControls(0) n Bitmap A bit set to 1 indicates that the mentioned Control is supported for master channel 0 D0 MuteD1 VolumeD2 BassD3 MidD4 TrebleD5 Graphic EqualizerD6 Automatic GainD7 DelayD8 Bass BoostD9 LoudnessD10..(n*8-1) Reserved 6+n bmaControls(1) n Bitmap A bit set to 1 indicates that the mentioned Control is supported for logical channel 1. … … … … … 6+(ch*n) bmaControls(ch) n Bitmap A bit set to 1 indicates that the mentioned Control is supported for logical channel ch. 6+(ch+1)*n iFeature 1 Index Index of a string descriptor, describing this Feature Unit. 4.3.2.6 Processing Unit Descriptor The Processing Unit is uniquely identified by the value in the bUnitID field of the Processing Unit descriptor (PUD). No other Unit or Terminal within the same alternate setting of the AudioControl interface may have the same ID. This value must be passed in the UnitID field of each request that is directed to the Processing Unit. The wProcessType field contains a value that fully identifies the Processing Unit. For a list of all supported Processing Unit Types, see Section A.7, “Processing Unit Process Types.” The bNrInPins field contains the number of Input Pins (p) of the Processing Unit. The connectivity of the Input Pins is described via the baSourceID() array that contains p elements. The index i into the array is one-based and directly related to the Input Pin numbers. BaSourceID(i) contains the ID of the Unit or USB Device Class Definition for Audio Devices Release 1.0 March 18, 1998 45 Terminal to which Input Pin i is connected. The cluster descriptors, describing the logical channels entering the Processing Unit are not repeated here. It is up to the Host software to trace the connections ‘upstream’ to locate the cluster descriptors pertaining to the audio channel clusters. Because a Processing Unit can freely redefine the spatial locations of the logical output channels, contained in its output cluster, there is a need for an output cluster descriptor. The bNrChannels, wChannelConfig, and iChannelNames fields characterize the cluster that leaves the Processing Unit over the single Output Pin (‘downstream’ connection). For a detailed description of the cluster descriptor, see Section 3.7.2.3, “Audio Channel Cluster Format.” The bmControls field is a bitmap, indicating the availability of certain audio Controls in the Processing Unit. For future expandability, the number of bytes occupied by the bmControls field is indicated in the bControlSize field. In general, all Controls are optional. However, some Processing Types may define certain Controls as mandatory. In such a case, the appropriate bit in the bmControls field must be set to one. The meaning of the bits in the bmControls field is qualified by the wProcessType field. However, bit D0 always represents the Enable Processing Control for all Processing Unit Types. The Enable Processing Control is used to bypass the entire functionality of the Processing Unit. Default behavior is assumed when set to off. In case of a single Input Pin, logical channels entering the Unit are passed unaltered for those channels that are also present in the output cluster. Logical channels not available in the output cluster are absorbed by the Processing Unit. Logical channels present in the output cluster but unavailable in the input cluster are muted. In case of multiple Input Pins, corresponding logical input channels are equally mixed together before being passed to the output. If the Enable Processing Control is present in a Processing Unit, bit D0 must be set to one. Otherwise, it is set to zero, indicating that the Processing Unit cannot be bypassed. An index to a string descriptor is provided to further describe the Processing Unit. The previous fields are common to all Processing Units. However, depending on the value in the wProcessType field, a process-specific part is added to the descriptor. The following paragraphs describe these process-specific parts. The following table outlines the common part of the Processing Unit descriptor. Table 4-8 Common Part of the Processing Unit Descriptor Offset Field Size Value Description 0 bLength 1 Number Size of this descriptor, in bytes 13+p+n+x 1 bDescriptorType 1 Constant CS_INTERFACE descriptor type. 2 bDescriptorSubtype 1 Constant PROCESSING_UNIT descriptor subtype. 3 bUnitID 1 Number Constant uniquely identifying the Unit within the audio function. This value is used in all requests to address this Unit. 4 wProcessType 2 Constant Constant identifying the type of processing this Unit is performing. 6 bNrInPins 1 Number Number of Input Pins of this Unit p 1 - 6 - 11 - 16 - 21 - 26 - 31 - 36 - 41 - 46 - 51 - 56 - 61 - 66 - 71 - 76 - 81 - 86 - 91 - 96 - 101 - 106 - 111 - 116 - 121 - 126 ここを編集
https://w.atwiki.jp/usb_audio/pages/45.html
原文:Audio Device Document 1.0(PDF) USB Device Class Definition for Audio Devices Release 1.0 March 18, 1998 81 Band Nr. Center Freq. Band Nr. Center Freq. Band Nr. Center Freq. 16 40Hz 26 400Hz 36* 4000Hz 17 50Hz 27* 500Hz 37 5000Hz 18* 63Hz 28 630Hz 38 6300Hz 19 80Hz 29 800Hz 39* 8000Hz 20 100Hz 30* 1000Hz 40 10000Hz 21* 125Hz 31 1250Hz 41 12500Hz 22 160Hz 32 1600Hz 42* 16000Hz 23 200Hz 33* 2000Hz 43 20000Hz Note Bands marked with an asterisk (*) are those present in an octave equalizer. A Feature Unit that supports the Graphic Equalizer Control is not required to implement the full set of filters. A subset (for example, octave bands) may be implemented. During a Get Control request, the bmBandsPresent field in the parameter block is a bitmap indicating which bands are effectively implemented and thus reported back in the returned parameter block. Consequently, the number of bits set in this field determines the total length of the returned parameter block. During a Set Control request, a bit set in the bmBandsPresent field indicates there is a new setting for that band in the parameter block that follows. The new values must be in ascending order. If the number of bits set in the bmBandsPresent field does not match the number of parameters specified in the following block, the control pipe must indicate a stall. A Graphic Equalizer Control can support all possible Control attributes (CUR, MIN, MAX, and RES). However, if a certain attribute is supported, it must do so for all individual bands. The settings for the CUR, MIN, and MAX attributes can range from +31.75 dB (0x7F) down to –32.00 dB (0x80) in steps of 0.25 dB (0x01). The settings for the RES attribute can only take positive values and range from 0.25 dB (0x01) to +31.75 dB (0x7F). The Graphic Equalizer Control honors the request to the best of its abilities. It may round the bBandxx attribute values to their closest available settings. It will report these settings when queried during a Get Control request. Only the first form of the Feature Unit Control request for Graphic Equalizer Control is supported. A particular Graphic Equalizer Control within a Feature Unit is addressed through the Unit ID and Channel Number fields of the Set/Get Feature Unit Control request. The valid range for the Channel Number field is from zero (the ‘master’ channel) up to the number of logical channels in the audio channel cluster. Table 5-27 Graphic Equalizer Control Parameter Block Control Selector GRAPHIC_EQUALIZER_CONTROL wLength 4+(number of bits set in bmBandsPresent NrBits) USB Device Class Definition for Audio Devices Release 1.0 March 18, 1998 82 Offset Field Size Value Description 0 bmBandsPresent 4 Bit Map A bit set indicates the band is present D0 Band 14 is present D1 Band 15 is present … D29 Band 43 is present D30 Reserved D31 Reserved 4 bBand(Lowest) 1 Number The setting for the attribute of the lowest band present 0x7F +31.75 dB 0x7E +31.50 dB … 0x00 0.00 dB … 0x82 -31.50 dB 0x81 -31.75 dB 0x80 -32.00 dB … … … … … 4+(NrBits-1) bBand(Highest) 1 Number The setting for the attribute of the highest band present. 5.2.2.4.3.7 Automatic Gain Control The Automatic Gain Control (AGC) is one of the building blocks of a Feature Unit. An Automatic Gain Control can have only the current setting attribute (CUR). The position of an Automatic Gain Control CUR attribute can be either TRUE or FALSE. In the first form of the request, a particular Automatic Gain Control within a Feature Unit is addressed through the Unit ID and Channel Number fields of the Set/Get Feature Unit Control request. The valid range for the Channel Number field is from zero (the ‘master’ channel) up to the number of logical channels in the audio channel cluster. Table 5-28 First Form of the Automatic Gain Control Parameter Block Control Selector AUTOMATIC_GAIN_CONTROL wLength 1 Offset Field Size Value Description 0 bAGC 1 Bool The setting for the attribute of the addressed Automatic Gain Control. On when TRUE, off when FALSE. In the second form, the Channel Number field is set to 0xFF. The parameter block contains a list of settings for all available AGC Controls in the Feature Unit. Table 5-29 Second Form of the Automatic Gain Control Parameter Block Control Selector AUTOMATIC_GAIN_CONTROL USB Device Class Definition for Audio Devices Release 1.0 March 18, 1998 83 wLength Number of available Controls NrAv Offset Field Size Value Description 0 bAGC(1) 1 Bool The setting for the attribute of the first Automatic Gain Control. … … … … … NrAv-1 bAGC(NrAv) 1 Bool The setting for the attribute of the last Automatic Gain Control. 5.2.2.4.3.8 Delay Control The Delay Control is one of the building blocks of a Feature Unit. A Delay Control can support all possible Control attributes (CUR, MIN, MAX, and RES). The settings for the CUR, MIN, MAX, and RES attributes can range from zero (0x0000) to 1023.9844ms (0xFFFF) in steps of 1/64 ms or 0.015625 ms (0x0001). The Delay Control honors the request to the best of its abilities. It may round the wDelay attribute value to its closest available setting. It will report this rounded setting when queried during a Get Control request. In the first form of the request, a particular Delay Control within a Feature Unit is addressed through the Unit ID and Channel Number fields of the Set/Get Feature Unit Control request. The valid range for the Channel Number field is from zero (the ‘master’ channel) up to the number of logical channels in the audio channel cluster. Table 5-30 First Form of the Delay Control Parameter Block Control Selector DELAY_CONTROL wLength 2 Offset Field Size Value Description 0 wDelay 2 Number The setting for the attribute of the addressed Delay Control 0x0000 0.0000 ms 0x0001 0.0156 ms 0x0002 0.0312 ms … 0x0040 1.0000 ms … 0xFFFD 1023.9531 ms 0xFFFE 1023.9687 ms 0xFFFF 1023.9844 ms In the second form, the Channel Number field is set to 0xFF. The parameter block contains a list of settings for all available Delay Controls in the Feature Unit. Table 5-31 Second Form of the Delay Control Parameter Block Control Selector DELAY_CONTROL wLength (Number of available Controls NrAv)*2 USB Device Class Definition for Audio Devices Release 1.0 March 18, 1998 84 Offset Field Size Value Description 0 wDelay(1) 1 Number The setting for the attribute of the first Delay Control. … … … … … (NrAv-1)*2 wDelay(NrAv) 1 Number The setting for the attribute of the last Delay Control. 5.2.2.4.3.9 Bass Boost Control The Bass Boost Control is one of the building blocks of a Feature Unit. A Bass Boost Control can have only the current setting attribute (CUR). The position of a Bass Boost Control CUR attribute can be either TRUE or FALSE. In the first form of the request, a particular Bass Boost Control within a Feature Unit is addressed through the Unit ID and Channel Number fields of the Set/Get Feature Unit Control request. The valid range for the Channel Number field is from zero (the ‘master’ channel) up to the number of logical channels in the audio channel cluster. Table 5-32 First Form of the Bass Boost Control Parameter Block Control Selector BASS_BOOST_CONTROL wLength 1 Offset Field Size Value Description 0 bBassBoost 1 Bool The setting for the addressed Bass Boost Control’s CUR attribute. On when TRUE, off when FALSE. In the second form, the Channel Number field is set to 0xFF. The parameter block contains a list of settings for the CUR attribute for all available Bass Boost Controls in the Feature Unit. Table 5-33 Second Form of the Bass Boost Control Parameter Block Control Selector BASS_BOOST_CONTROL wLength Number of available Controls NrAv Offset Field Size Value Description 0 bBassBoost(1) 1 Bool The setting for the CUR attribute of the first Bass Boost Control. … … … … … NrAv-1 bBassBoost(NrAv) 1 Bool The setting for the CUR attribute of the last Bass Boost Control. 5.2.2.4.3.10 Loudness Control USB Device Class Definition for Audio Devices Release 1.0 March 18, 1998 85 The Loudness Control is one of the building blocks of a Feature Unit. A Loudness Control can have only the current setting attribute (CUR). The position of a Loudness Control CUR attribute can be either TRUE or FALSE. In the first form of the request, a particular Loudness Control within a Feature Unit is addressed through the Unit ID and Channel Number fields of the Set/Get Feature Unit Control request. The valid range for the Channel Number field is from zero (the ‘master’ channel) up to the number of logical channels in the audio channel cluster. Table 5-34 First Form of the Loudness Control Parameter Block Control Selector LOUDNESS_CONTROL wLength 1 Offset Field Size Value Description 0 bLoudness 1 Bool The setting for the addressed Loudness Control’s CUR attribute. On when TRUE, off when FALSE. In the second form, the Channel Number field is set to 0xFF. The parameter block contains a list of settings for the CUR attribute for all available Loudness Controls in the Feature Unit. Table 5-35 Second Form of the Loudness Control Parameter Block Control Selector LOUDNESS_CONTROL wLength Number of available Controls NrAv Offset Field Size Value Description 0 bLoudness(1) 1 Bool The setting for the CUR attribute of the first Loudness Control. … … … … … NrAv-1 bLoudness(NrAv) 1 Bool The setting for the CUR attribute of the last Loudness Control. 5.2.2.5 Processing Unit Control Requests The following sections describe the Set and Get Processing Unit Control requests. They are used to manipulate the audio Controls within a Processing Unit. 1 - 6 - 11 - 16 - 21 - 26 - 31 - 36 - 41 - 46 - 51 - 56 - 61 - 66 - 71 - 76 - 81 - 86 - 91 - 96 - 101 - 106 - 111 - 116 - 121 - 126 ここを編集